package com.shy.controller;

import com.shy.config.model.R;
import com.shy.entity.DicValue;
import com.shy.service.DicValueService;
import io.swagger.annotations.ApiOperation;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/dic")
public class DicController {
    @Resource
    private DicValueService dicValueService;
   @ApiOperation("字典类型列表")
    @RequestMapping("value/list/{typeCode}")
    public R<List<DicValue>> queryDicTypeList(@PathVariable String typeCode){
       List<DicValue> dicValues = dicValueService.queryDicValueByCode(typeCode);
       return R.success(dicValues);
    }
}
